import godown from "../../../../imgs/godown.png";

export default class SelectMoreComps extends React.Component {
    render() {
        const {
            multiply,
            open,
            setOpen,
            setMultiply,
            lists,
            minWidth,
            hideOpen
        } = this.props;
        if (lists && lists.length == 0) {
            return null;
        }
        if (!multiply) {
            return (
                <div className={"search-page-select-more"}>

                    <div
                        onClick={() => setMultiply(!multiply)}
                        className={"search-page-select-more-duo"}
                    >
                        <p>多选</p>
                    </div>

                    {
                        hideOpen?
                            <div></div>
                            :
                            <div
                                onClick={() => setOpen(!open)}
                                className={"search-page-select-more-gen"}
                            >
                                <p className={"search-page-select-more-gen-p1"}>
                                    {open ? "收起" : "更多"}
                                </p>
                                <img
                                    src={godown}
                                    className={
                                        open ? "search-page-select-more-imgclick" : ""
                                    }
                                />
                            </div>
                    }

                </div>
            );
        }
        if (minWidth) {
            return <div style={{ width: 80 }} />;
        }
        return <div className={"search-page-select-more"} />;
    }
}
